package wufei_database;

import java.sql.*;

public class Test1
{
  public static void main(String[] args)
  {
    try
    {
      Connection conn;
      Statement stmt;
      ResultSet res;

      Class.forName("com.mysql.jdbc.Driver").newInstance();

      conn = DriverManager.getConnection("jdbc:mysql://pardosa04.cs.washington.edu/trwiki",
                                         "clzhang", "kylin");

      stmt = conn.createStatement();
      res = stmt.executeQuery("select * from infobox20080724_ca where title='Albert Einstein'");

      while (res.next())
      {
        String name = res.getString("class");
        System.out.println(name);
      }
      res.close();

    }
    catch (Exception ex)
    {
      System.out.println("Error : " + ex.toString());
    }
  }
}